package com.cm.figure.service.userService;

import com.cm.figure.dao.UserMapper;
import com.cm.figure.model.User;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * ClassName:UserServiceImp
 * Package:com.cm.figure.service.userService
 * Description:
 *
 * @Date:2021/8/15 16:16
 * @com.chuangmei
 */
@Service
public class UserServiceImp implements UserService{

    @Resource
    private UserMapper userdao;

    @Override
    @Transactional(isolation = Isolation.DEFAULT,propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
    public User queryUserByUserId(Integer userid) {

        return userdao.selectUserByUserId(userid);
    }
}
